<?php 
Class msgController extends appController
{
	
	public function index()
	{
		
		//广告轮播
		$this->assign('ur_here',Model('msg')->where_am_i());
		$index_ad=$this->get_ad('contact_us');
		$this->assign('contact_ad',$index_ad);
        $this->display('feed.html');
	}
	public function sumbit()
	{
		$info['name']=isset($_POST['name'])?$_POST['name']:'';
		$info['phone']=isset($_POST['phone'])?$_POST['phone']:'';
		$info['email']=isset($_POST['email'])?$_POST['email']:'';
		$info['content']=isset($_POST['content'])?$_POST['content']:'';
		if(Model('msg')->insert_msg($info))
		
		{
			$this->showMsg(Lang('VALID_OPERATION'),'index.php');
		}
		else
		{
			$this->showMsg(Lang('INVALID_OPERATION'));
		}
	}
}